import { SelectControlSchema } from 'amis/lib/renderers/Form/Select'
import amisUtils from '@/components/amis/amisUtils'
import SmsSupplierTypeEnum from '@/core/sms/enums/SmsSupplierTypeEnum'

class SmsSupplierTypeSelectUtils {
	getSchema = (parmas?: Partial<SelectControlSchema>): SelectControlSchema => {
		const mergeSchema = Object.assign(
			{
				name: 'smsSupplierType',
				type: 'select',
				label: '供应商',
				clearable: true,
				options: amisUtils.getSelectOptionsFromBaseEnumValues(SmsSupplierTypeEnum.ALIYUN, SmsSupplierTypeEnum.TEST),
			},
			parmas,
		)

		const schema = mergeSchema
		return schema
	}
}

export default new SmsSupplierTypeSelectUtils()
